home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1998 September
/
Macworld (1998-09).dmg
/
Shareware World
/
Graphics
/
QPict 3.0
/
QPict 3.0.rsrc
/
TEXT_128_Help Menu Guide.txt
< prev
next >
Wrap
Text File
|
1998-07-09
|
2KB
|
65 lines
// ---------------------------------------------------------------------------
// • DoHelpMenuCommand
// ---------------------------------------------------------------------------
// Launches specified URL and checks for errors.
//
void
CQPictApp::DoHelpMenuCommand(CommandT inCommand)
{
if(inCommand == cmd_AboutHelpMenu)
{
LDialogBox* theDialog = (LDialogBox *) LWindow::CreateWindow(WIND_AboutHelp, this);
//LCaption* regName = (LCaption*)theDialog->FindPaneByID(2011);
//LCaption* regCompany = (LCaption*)theDialog->FindPaneByID(2016);
theDialog->Show();
}
else
{
//LStr255 url(STRx_HelpLocalURLStrings, inCommand);
LStr255 url(STRx_HelpExtURLStrings, inCommand);
if(url != "\p")
{
ICError err = mIC->DoURL(url);
if(err != noErr)
gError.ModalAlert(err, stop, 26);
}
}
// Str255 url;
// ::GetIndString(url, STRx_HelpMenuURLStrings, strIndex);
//STRx_HelpExtURLStrings
// ICError err = mIC->DoURL(url);
// if(err != noErr)
// gError.ModalAlert(err, stop, 26);
}
// ---------------------------------------------------------------------------
// • SendSelfAEOpenDoc - static
// ---------------------------------------------------------------------------
// Self-send an AppleEvent to open a document.
//
void
CQPictApp::SendSelfAEOpenDoc(FSSpec &inFileSpec)
{
Try_
{
AppleEvent openEvent;
UAppleEventsMgr::MakeAppleEvent(kCoreEventClass, kAEOpen, openEvent);
OSErr err = ::AEPutParamPtr(&openEvent, keyDirectObject, typeFSS,
&inFileSpec, sizeof(FSSpec));
ThrowIfOSErr_(err);
UAppleEventsMgr::SendAppleEvent(openEvent);
}
Catch_(inErr)
{
// Ignore it.
} EndCatch_
}